package com.example.springboot_mybatisplus.config;


import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author linruhai
 * @date 2021/10/10 - 18:00
 */
@Configuration
@MapperScan("com.example.springboot_mybatisplus.dao")
public class MybatisPlusConfig {
/*    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        //分页插件
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInterceptor());
        return mybatisPlusInterceptor;

    }*/

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();


    }
}
